
<!--头部-->
<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Red-Team</title>

    <!-- Bootstrap Core CSS -->
    <link href="/thinkphp/public/static/lib/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/thinkphp/public/static/lib/metisMenu/dist/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/thinkphp/public/static/css/sb-admin-2.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/thinkphp/public/static/lib/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

</head>
<link href="https://cdn.bootcss.com/bootstrap-validator/0.5.3/css/bootstrapValidator.min.css" rel="stylesheet">
<style>
    .error {
        color: #ff4b54;
    }
</style>
<body>
<div id="wrapper">

    <!--顶部与右侧导航-->
    <!-- Navigation -->
    <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="index.html">信息管理系统</a>
        </div>
        <!-- /.navbar-header -->

        <ul class="nav navbar-top-links navbar-right">
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-envelope fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-messages">
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <strong>John Smith</strong>
                                    <span class="pull-right text-muted">
                                        <em>Yesterday</em>
                                    </span>
                            </div>
                            <div>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eleifend...</div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>Read All Messages</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-messages -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-tasks fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-tasks">
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 1</strong>
                                    <span class="pull-right text-muted">40% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100" style="width: 40%">
                                        <span class="sr-only">40% Complete (success)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 2</strong>
                                    <span class="pull-right text-muted">20% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100" style="width: 20%">
                                        <span class="sr-only">20% Complete</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 3</strong>
                                    <span class="pull-right text-muted">60% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: 60%">
                                        <span class="sr-only">60% Complete (warning)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <p>
                                    <strong>Task 4</strong>
                                    <span class="pull-right text-muted">80% Complete</span>
                                </p>
                                <div class="progress progress-striped active">
                                    <div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100" style="width: 80%">
                                        <span class="sr-only">80% Complete (danger)</span>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Tasks</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-tasks -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-alerts">
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-comment fa-fw"></i> New Comment
                                <span class="pull-right text-muted small">4 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a href="#">
                            <div>
                                <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                <span class="pull-right text-muted small">12 minutes ago</span>
                            </div>
                        </a>
                    </li>
                    <li class="divider"></li>
                    <li>
                        <a class="text-center" href="#">
                            <strong>See All Alerts</strong>
                            <i class="fa fa-angle-right"></i>
                        </a>
                    </li>
                </ul>
                <!-- /.dropdown-alerts -->
            </li>
            <!-- /.dropdown -->
            <li class="dropdown">
                <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                </a>
                <ul class="dropdown-menu dropdown-user">
                    <li><a href="#"><i class="fa fa-user fa-fw"></i> 江子豪</a>
                    </li>
                    <li><a href="#"><i class="fa fa-gear fa-fw"></i> 修改密码</a>
                    </li>
                    <li class="divider"></li>
                    <li><a href="/thinkphp/public/index.php/admin/login/out.html"><i class="fa fa-sign-out fa-fw"></i> 注销</a>
                    </li>
                </ul>
                <!-- /.dropdown-user -->
            </li>
            <!-- /.dropdown -->
        </ul>
        <!-- /.navbar-top-links -->

        <div class="navbar-default sidebar" role="navigation">
            <div class="sidebar-nav navbar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="sidebar-search">
                        <div class="input-group custom-search-form">
                            <input type="text" class="form-control" placeholder="Search...">
                                <span class="input-group-btn">
                                <button class="btn btn-default" type="button">
                                    <i class="fa fa-search"></i>
                                </button>
                            </span>
                        </div>
                        <!-- /input-group -->
                    </li>
                    <li>
                        <a href="/thinkphp/public/index.php/admin/index/index.html"><i class="fa fa-dashboard fa-fw"></i> 控制台</a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-info-circle fa-fw"></i> 详情信息<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="/thinkphp/public/index.php/admin/customer/index.html"><i class="fa fa-credit-card fa-fw"></i> 售卡信息</a>
                            </li>
                            <li>
                                <a href="flot.html"><i class="fa fa-file-text-o fa-fw"></i> 订单信息</a>
                            </li>
                            <li>
                                <a href="flot.html"><i class="fa fa-files-o fa-fw"></i> 带单信息</a>
                            </li>
                        </ul>
                        <!-- /.nav-second-level -->
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-sitemap fa-fw"></i> Multi-Level Dropdown<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="#">Second Level Item</a>
                            </li>
                            <li>
                                <a href="#">Second Level Item</a>
                            </li>
                            <li>
                                <a href="#">Third Level <span class="fa arrow"></span></a>
                                <ul class="nav nav-third-level">
                                    <li>
                                        <a href="#">Third Level Item</a>
                                    </li>
                                    <li>
                                        <a href="#">Third Level Item</a>
                                    </li>
                                    <li>
                                        <a href="#">Third Level Item</a>
                                    </li>
                                    <li>
                                        <a href="#">Third Level Item</a>
                                    </li>
                                </ul>
                                <!-- /.nav-third-level -->
                            </li>
                        </ul>
                        <!-- /.nav-second-level -->
                    </li>
                </ul>
            </div>
            <!-- /.sidebar-collapse -->
        </div>
        <!-- /.navbar-static-side -->
    </nav>

    <!--页面主体-->
    <div id="page-wrapper">
        <div class="row">
            <div class="col-lg-12">
                <h1 class="page-header">添加售卡信息</h1>
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        <div class="btn-group" role="group" aria-label="...">
                            <a type="button" class="btn btn-default btn-sm" onclick="window.history.back();"><i
                                    class="fa fa-chevron-left fa-fw"></i>返回</a>
                            <button onclick="javascript:location.reload();" type="button"
                                    class="btn btn-default btn-sm"><i class="fa fa-refresh fa-fw"></i>刷新
                            </button>
                            <button type="button" class="btn btn-default btn-sm"><i class="fa fa-pencil fa-fw"></i>修改
                            </button>
                            <button type="button" class="btn btn-default btn-sm"><i class="fa fa-trash-o fa-fw"></i>删除
                            </button>
                        </div>
                    </div>
                    <!-- /.panel-heading -->
                    <div class="panel-body">

                        <form id="add" class="form-horizontal">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">客户姓名</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" name="name" id="name" value="" required/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">手机号码</label>
                                <div class="col-sm-7">
                                    <input type="number" class="form-control" name="tel" id="tel" value="" required/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">装修地址</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" name="address" id="address" value=""
                                           required/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">装修进度</label>
                                <div class="col-sm-7">
                                    <select type="text" class="form-control" name="step" id="step" value="" required>
                                        <option value="">请选择装修进度</option>
                                        <option value="未开工">未开工</option>
                                        <option value="水电">水电</option>
                                        <option value="砖工">砖工</option>
                                        <option value="木工">木工</option>
                                        <option value="油漆">油漆</option>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">卡号</label>
                                <div class="col-sm-7">
                                    <input type="number" class="form-control" name="cid" id="cid" value="" required/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">售卡人员</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" name="seller" id="seller" value=""
                                           required/>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">售卡日期</label>
                                <div class="col-sm-7">
                                    <input type="date" class="form-control" name="date" id="date" value="" required/>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">售卡品牌</label>
                                <div class="col-sm-7">
                                    <select type="text" class="form-control" name="brand" id="brand" value="" required>
                                        <option value="">请选择售卡品牌</option>
                                        <option value="AO史密斯">AO史密斯</option>
                                        <option value="上臣地板">上臣地板</option>
                                        <option value="东鹏瓷砖">东鹏瓷砖</option>
                                        <option value="兴辉陶瓷">兴辉陶瓷</option>
                                        <option value="华帝燃具">华帝燃具</option>
                                        <option value="嘉世豪庭">嘉世豪庭</option>
                                        <option value="圣象地板">圣象地板</option>
                                        <option value="城市领秀">城市领秀</option>
                                        <option value="大津硅藻泥">大津硅藻泥</option>
                                        <option value="好莱客衣柜">好莱客衣柜</option>
                                        <option value="尚高卫浴">尚高卫浴</option>
                                        <option value="帅丰环保灶">帅丰环保灶</option>
                                        <option value="帝标家居">帝标家居</option>
                                        <option value="德莱宝家居顶">德莱宝家居顶</option>
                                        <option value="徽格装饰">徽格装饰</option>
                                        <option value="我乐橱柜">我乐橱柜</option>
                                        <option value="晨阳水漆">晨阳水漆</option>
                                        <option value="晾霸">晾霸</option>
                                        <option value="林内热水器">林内热水器</option>
                                        <option value="浪度家居">浪度家居</option>
                                        <option value="盼盼木门">盼盼木门</option>
                                        <option value="箭牌橱柜">箭牌橱柜</option>
                                        <option value="罗绮窗帘">罗绮窗帘</option>
                                        <option value="联邦高登">联邦高登</option>
                                    </select>
                                </div>
                            </div>
                        </form>
                    </div>
                    <!-- /.panel-body -->
                    <div class="panel-footer">
                        <button type="reset" class="btn btn-default">重置</button>
                        <button id="create" type="submit" class="btn btn-primary">保存</button>
                    </div>

                    <!-- /.panel-footer -->
                </div>
                <!-- /.panel -->
            </div>
            <!-- /.col-lg-12 -->
        </div>
        <!-- /.row -->
    </div>
    <!-- /#page-wrapper -->

</div>
<!-- /#wrapper -->

<!--公共js-->
<!-- jQuery -->
<script src="/thinkphp/public/static/lib/jquery/dist/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="/thinkphp/public/static/lib/bootstrap/dist/js/bootstrap.min.js"></script>

<!-- Metis Menu Plugin JavaScript -->
<script src="/thinkphp/public/static/lib/metisMenu/dist/metisMenu.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="/thinkphp/public/static/js/sb-admin-2.js"></script>

<!-- 阿里G2图表 -->
<script src="https://a.alipayobjects.com/g/datavis/g2/2.3.4/index.js"></script>

<script src="https://cdn.bootcss.com/bootstrap-validator/0.5.3/js/bootstrapValidator.min.js"></script>
<script src="https://cdn.bootcss.com/bootstrap-validator/0.5.3/js/language/zh_CN.min.js"></script>
<!--<script src="/thinkphp/public/static/lib/jquery_validation/dist/jquery.validate.min.js"></script>

<script src="http://static.runoob.com/assets/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script src="/thinkphp/public/static/lib/jquery_validation/1.14.0/validate-methods.js"></script>-->

<script>
    $("#create").click(function () {
        var form = new FormData(document.getElementById("add"));
        $.ajax({
            url:"{:url('admin/customer/save')}",
            type:"POST",
            data:form,
            processData:false, // 告诉jQuery不要去处理发送的数据
            contentType:false, // 告诉jQuery不要去设置Content-Type请求头
            success:function(data){
                $("#add_alert").html('<div id="add_banner" class="alert alert-warning"></div>');
                $("#add_banner").html('<a class="close" data-dismiss="alert">&times;</a>' + data);
            },
            error:function(){
                alert("连接失败");
            }
        });
    });
</script>
</body>

</html>